

/**
 * 登录
 * @param data
 * @returns {Promise<unknown>}
 */
export function login(data) {

    return new Promise((resolve, reject) => {
        let result ={
            code:200,
            msg:"操作成功",
            data:{
                token:'32135163123safsdgaxzcasf',
                expired:new Date().getTime() + 1000*60*5,
            }
        }
        resolve(result);
    })
}

/**
 * 获取个人信息
 * @param data
 * @returns {Promise<unknown>}
 */
export function getInfo(data) {


    return new Promise((resolve, reject) => {
        let result ={
            code:200,
            msg:"操作成功",
            data:{
                //登录信息
                loginUser:{
                    userId:1,
                    username:'admin',
                    nickname:'超级管理员',
                },
                //权限
                promission:['*:*:*']

            }
        }
        resolve(result);
    })
}/**
 * 退出登录
 * @param data
 * @returns {Promise<unknown>}
 */
export function loginOut(data) {


    return new Promise((resolve, reject) => {
        let result ={
            code:200,
            msg:"操作成功",
            data:{
                //登录信息
                loginUser:{
                    userId:1,
                    username:'admin',
                    nickname:'超级管理员',
                },
                //权限
                promission:['*:*:*']

            }
        }
        resolve(result);
    })
}